from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能


class 技能0(主动技能):
    名称 = '魔球连射'
    所在等级 = 5
    等级上限 = 11
    基础等级 = 1
    data0 = [0+(108+2*i) for i in range(1, 11)]
    hit0 = 5
    CD = 3
    MP = [22, 183]


class 技能1(被动技能):
    名称 = '元素融合'
    所在等级 = 15
    等级上限 = 11
    基础等级 = 1
    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.095+0.005*self.等级, 5)


class 技能2(主动技能):
    名称 = "元素炮"
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 2
    等级精通 = 1
    CD = 5
    MP = [31, 259]
    无色消耗 = 0
    data0 = [0, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600]
    hit0 = 1


class 技能3(主动技能):
    名称 = "属性变换"
    所在等级 = 15
    等级上限 = 70
    学习间隔 = 5
    等级精通 = 60
    CD = 5
    MP = [181, 3134]
    无色消耗 = 0
    data0 = [0, 376, 463, 550, 638, 726, 814, 902, 989, 1077, 1165, 1253, 1340, 1427, 1514, 1603, 1691, 1777, 1866, 1953, 2042, 2130, 2216, 2305, 2392, 2481, 2567, 2654, 2743, 2830, 2918, 3005, 3093, 3180, 3268, 3357, 3444, 3532, 3619, 3707, 3795, 3883, 3971, 4058, 4146, 4233, 4322, 4408, 4495, 4582, 4670, 4759, 4846, 4935, 5021, 5109, 5197, 5285, 5374, 5460, 5548, 5636, 5724, 5813, 5898, 5986, 6074, 6162, 6249, 6337, 6424]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7

    关联技能 = ['元素炮', '魔球连射']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round((self.data0[self.等级]*0.01) * (1+self.TP成长 * self.TP等级), 5)


class 技能4(被动技能):
    名称 = '元素之力'
    所在等级 = 20
    等级上限 = 11
    基础等级 = 1
    每层加成 = [0, 7, 8, 10, 11, 13, 14, 15, 17, 18, 20, 21]
    关联技能 = ['元素炮']
    额外倍率 = 0
    层数 = 4

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1+(((0.01*self.每层加成[self.等级] + self.额外倍率)*self.层数) if self.额外倍率 > 0 else (0.01*self.每层加成[self.等级]*5)), 5)


class 技能5(主动技能):
    名称 = "冰晶坠"
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 8
    MP = [60, 616]
    无色消耗 = 0
    data0 = [0, 664, 729, 797, 865, 933, 999, 1067, 1135, 1202, 1270, 1335, 1402, 1472, 1538, 1606, 1673, 1741, 1808, 1876, 1943, 2010, 2078, 2145, 2212, 2280, 2346, 2414, 2483, 2549, 2616, 2684, 2752, 2820, 2886, 2953, 3020, 3089, 3156, 3222, 3292, 3358, 3426, 3492, 3561, 3628, 3696, 3762, 3829, 3897, 3964, 4031, 4101, 4166, 4234, 4301, 4370, 4436, 4504, 4570, 4638, 4706, 4772, 4839, 4909, 4975, 5042, 5108, 5178, 5245, 5313]
    hit0 = 7
    TP成长 = 0.1
    TP上限 = 7


class 技能6(主动技能):
    名称 = '元素环绕'
    所在等级 = 25
    等级上限 = 20
    基础等级 = 10
    是否有伤害 = 0

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.03+0.005*self.等级, 5)


class 技能7(被动技能):
    名称 = '元素禁断'
    所在等级 = 25
    基础等级 = 5
    等级上限 = 5

    关联技能 = ['无']

    冷却关联技能 = ['所有']
    非冷却关联技能 = ['幻魔四重奏', '末日湮灭', '启源·微观宇宙']

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 0.8


class 技能8(主动技能):
    名称 = "地炎"
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 5
    MP = [45, 476]
    无色消耗 = 0
    data0 = [0, 382, 421, 460, 498, 538, 576, 616, 655, 694, 732, 771, 812, 852, 889, 929, 966, 1006, 1046, 1085, 1124, 1162, 1200, 1239, 1279, 1318, 1359, 1394, 1435, 1474, 1514, 1553, 1591, 1630, 1669, 1708, 1748, 1785, 1825, 1864, 1903, 1942, 1981, 2019, 2060, 2097, 2136, 2177, 2214, 2254, 2292, 2332, 2371, 2411, 2449, 2487, 2526, 2566, 2605, 2645, 2684, 2723, 2761, 2800, 2838, 2879, 2917, 2957, 2995, 3032, 3072]
    hit0 = 12
    TP成长 = 0.1
    TP上限 = 7


class 技能9(主动技能):
    名称 = "雷光链"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 12
    MP = [100, 1050]
    无色消耗 = 0
    data0 = [0, 1669, 1839, 2010, 2176, 2347, 2516, 2685, 2855, 3026, 3194, 3363, 3533, 3705, 3874, 4043, 4211, 4382, 4550, 4722, 4890, 5060, 5229, 5399, 5568, 5737, 5908, 6078, 6246, 6416, 6585, 6755, 6925, 7095, 7263, 7433, 7602, 7773, 7942, 8111, 8281, 8450, 8619, 8791, 8960, 9130, 9298, 9467, 9637, 9808, 9977, 10145, 10315, 10487, 10655, 10825, 10995, 11163, 11332, 11502, 11673, 11842, 12011, 12180, 12350, 12520, 12690, 12860, 13027, 13197, 13367]
    hit0 = 4
    TP成长 = 0.2
    TP上限 = 7


class 技能10(主动技能):
    名称 = "暗域扩张"
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 15
    MP = [80, 980]
    无色消耗 = 0
    data0 = [0, 9452, 10412, 11372, 12330, 13290, 14250, 15208, 16167, 17128, 18087, 19045, 20005, 20964, 21923, 22884, 23840, 24801, 25762, 26718, 27680, 28638, 29597, 30555, 31516, 32474, 33436, 34394, 35352, 36312, 37270, 38230, 39190, 40150, 41108, 42067, 43027, 43983, 44946, 45906, 46863, 47823, 48781, 49740, 50702, 51660, 52620, 53579, 54538, 55496, 56456, 57416, 58376, 59333, 60293, 61252, 62210, 63171, 64130, 65090, 66049, 67007, 67968, 68925, 69885, 70845, 71804, 72763, 73723, 74682, 75641]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 7


class 技能11(被动技能):
    名称 = '元素循环'
    所在等级 = 30
    等级上限 = 20
    基础等级 = 10

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.00 + 0.02 * self.等级, 5)


class 技能12(主动技能):
    名称 = "冰晶之浴"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 12
    MP = [150, 1148]
    无色消耗 = 0
    data0 = [0, 712, 784, 859, 930, 1003, 1075, 1150, 1221, 1293, 1367, 1438, 1512, 1585, 1655, 1730, 1802, 1873, 1946, 2019, 2091, 2163, 2236, 2309, 2382, 2454, 2529, 2601, 2672, 2744, 2819, 2891, 2964, 3035, 3108, 3181, 3252, 3325, 3399, 3469, 3543, 3616, 3688, 3761, 3833, 3908, 3979, 4051, 4123, 4195, 4270, 4341, 4415, 4487, 4558, 4631, 4703, 4778, 4848, 4923, 4995, 5066, 5140, 5212, 5285, 5358, 5430, 5502, 5575, 5649, 5720]
    hit0 = 14
    TP成长 = 0
    TP上限 = 1


    def 等效CD(self, **argv):
        # 武器类型 输出类型 额外CDR 手搓收益 恢复
        武器类型 = argv.get('武器类型', '')
        输出类型 = argv.get('输出类型', '')
        额外CDR = argv.get('额外CDR', 1.0)
        # 手搓收益 = argv.get('手搓收益', 1.0)
        面板显示 = argv.get('面板显示', False)
        额外恢复 = argv.get('额外恢复', 0)

        cdr = self.手搓CD()

        return round(max(self.CD * (self.CDR*(0.75 if self.TP等级 > 0 else 1)) * 额外CDR / ((self.恢复 + 额外恢复) if not 面板显示 else 1) * (self.武器CD系数(武器类型, 输出类型) - (cdr if not 面板显示 else 0)), self.CD * 0.3) * self.CDR_O, 1)

class 技能13(主动技能):
    名称 = "旋炎破"
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [150, 1148]
    无色消耗 = 1
    data0 = [0, 1162, 1280, 1398, 1517, 1636, 1752, 1871, 1988, 2107, 2227, 2342, 2463, 2579, 2698, 2815, 2934, 3051, 3170, 3286, 3407, 3524, 3642, 3761, 3878, 3997, 4115, 4233, 4352, 4469, 4587, 4707, 4823, 4943, 5059, 5179, 5296, 5416, 5531, 5651, 5769, 5887, 6006, 6123, 6242, 6358, 6477, 6596, 6713, 6833, 6950, 7068, 7186, 7303, 7421, 7540, 7658, 7777, 7895, 8013, 8131, 8249, 8366, 8486, 8602, 8722, 8838, 8958, 9075, 9193, 9312]
    hit0 = 6
    data1 = [0, 4654, 5128, 5600, 6073, 6545, 7018, 7489, 7963, 8435, 8908, 9379, 9851, 10323, 10796, 11268, 11742, 12213, 12686, 13157, 13630, 14103, 14575, 15048, 15521, 15993, 16465, 16937, 17410, 17882, 18355, 18829, 19301, 19773, 20245, 20718, 21190, 21662, 22134, 22608, 23081, 23552, 24025, 24497, 24970, 25441, 25916, 26387, 26860, 27331, 27805, 28276, 28749, 29219, 29696, 30168, 30640, 31113, 31586, 32058, 32531, 33002, 33474, 33947, 34420, 34892, 35364, 35836, 36309, 36781, 37254]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 5

    无色消耗 = 1
    是否有护石 = 1

    def 装备护石(self, char):
        self.power0 = 1.30
        self.power1 = 1.34


class 技能14(主动技能):
    名称 = "雷光屏障"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [350, 3080]
    无色消耗 = 1
    data0 = [0, 12941, 14254, 15568, 16882, 18193, 19508, 20821, 22133, 23446, 24761, 26073, 27384, 28697, 30011, 31324, 32637, 33952, 35263, 36576, 37889, 39203, 40516, 41828, 43143, 44454, 45768, 47081, 48392, 49708, 51020, 52335, 53647, 54960, 56274, 57585, 58899, 60212, 61526, 62838, 64152, 65464, 66780, 68092, 69407, 70720, 72031, 73345, 74656, 75970, 77283, 78595, 79907, 81222, 82536, 83850, 85162, 86475, 87787, 89101, 90414, 91727, 93039, 94354, 95666, 96979, 98293, 99606, 100920, 102231, 103546]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.power0 = (4 + 0.4) * (1 - 0.72)


class 技能15(主动技能):
    名称 = "黑暗禁域"
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 20
    MP = [300, 2520]
    无色消耗 = 1
    data0 = [0, 12247, 13489, 14731, 15975, 17215, 18460, 19702, 20945, 22188, 23429, 24673, 25916, 27158, 28400, 29641, 30884, 32128, 33370, 34613, 35855, 37099, 38341, 39585, 40826, 42067, 43311, 44555, 45796, 47039, 48282, 49525, 50768, 52008, 53254, 54494, 55738, 56981, 58222, 59466, 60710, 61952, 63193, 64436, 65679, 66923, 68163, 69408, 70648, 71893, 73136, 74375, 75621, 76860, 78106, 79347, 80590, 81833, 83075, 84318, 85559, 86803, 88046, 89288, 90529, 91775, 93015, 94260, 95501, 96744, 97987]
    hit0 = 1
    TP成长 = 0.1
    TP上限 = 5


class 技能16(主动技能):
    名称 = "元素轰炸"
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    CD = 40
    MP = [360, 3149]
    无色消耗 = 2
    data0 = [0, 4270, 4701, 5134, 5568, 6001, 6433, 6868, 7301, 7733, 8168, 8601, 9035, 9468, 9901, 10334, 10769, 11200, 11634, 12069, 12501, 12934, 13368, 13800, 14233, 14668, 15100, 15534, 15969, 16398, 16834, 17269, 17698, 18133, 18567, 19000, 19433, 19867, 20300, 20734, 21166, 21599, 22033, 22465, 22899, 23333, 23766, 24198, 24633, 25065, 25499, 25931, 26366, 26799, 27233, 27666, 28100, 28533, 28967, 29399, 29832, 30266, 30696, 31131, 31565, 31996, 32430, 32864, 33296, 33730, 34165]
    hit0 = 1
    data1 = [0, 8540, 9406, 10272, 11139, 12005, 12871, 13741, 14606, 15473, 16340, 17206, 18070, 18937, 19804, 20669, 21537, 22405, 23271, 24137, 25005, 25870, 26737, 27604, 28470, 29335, 30204, 31070, 31937, 32803, 33669, 34536, 35402, 36269, 37135, 38003, 38868, 39737, 40603, 41469, 42336, 43203, 44067, 44933, 45800, 46670, 47534, 48401, 49269, 50134, 51000, 51868, 52734, 53599, 54470, 55334, 56199, 57067, 57934, 58799, 59666, 60533, 61398, 62266, 63132, 63999, 64867, 65732, 66599, 67467, 68332]
    hit1 = 1
    data2 = [0, 390, 430, 471, 511, 549, 592, 630, 669, 711, 748, 790, 830, 868, 911, 950, 989, 1028, 1067, 1109, 1149, 1188, 1228, 1269, 1307, 1349, 1389, 1427, 1468, 1509, 1547, 1589, 1626, 1667, 1707, 1746, 1788, 1827, 1866, 1906, 1949, 1986, 2027, 2066, 2104, 2148, 2185, 2226, 2265, 2305, 2345, 2385, 2424, 2465, 2505, 2543, 2586, 2624, 2665, 2704, 2745, 2785, 2823, 2863, 2903, 2944, 2983, 3025, 3064, 3101, 3143]
    hit2 = 45
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 += 2.26 + 0.27
        self.hit1 += 1.45 + 0.46
        self.hit2 = 0


class 技能17(被动技能):
    名称 = '元素爆发'
    所在等级 = 48
    等级上限 = 60
    等级精通 = 50
    学习间隔 = 3

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            if self.等级 <= 16:
                return round(1.015 + 0.015 * self.等级, 5)
            else:
                return round(1.255 + 0.020 * (self.等级 - 16), 5)


class 技能18(主动技能):
    名称 = "幻魔四重奏"
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 145
    MP = [600, 5040]
    无色消耗 = 5
    data0 = [0, 3012, 3710, 4410, 5109, 5806, 6505, 7206, 7904, 8602, 9303, 9999, 10699, 11400, 12098, 12797, 13497, 14195, 14894, 15593, 16291, 16991, 17689, 18388, 19086, 19785, 20485, 21184, 21881, 22582, 23281, 23981, 24679, 25379, 26077, 26775, 27475, 28174, 28872, 29572, 30268, 30968, 31668, 32366, 33065, 33763, 34463, 35163, 35862, 36561, 37261]
    hit0 = 30


class 技能19(主动技能):
    名称 = "元素浓缩球"
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 30
    MP = [450, 1260]
    无色消耗 = 1
    data0 = [0, 7516, 8280, 9042, 9805, 10568, 11331, 12093, 12856, 13619, 14382, 15145, 15907, 16669, 17434, 18196, 18959, 19720, 20483, 21248, 22011, 22773, 23536, 24297, 25062, 25825, 26587, 27349, 28114, 28875, 29639, 30401, 31163, 31927, 32689, 33451, 34215, 34977, 35741, 36503, 37265, 38028, 38793, 39554, 40317, 41079, 41842, 42606, 43368, 44131, 44894]
    hit0 = 1
    data1 = [0, 17541, 19322, 21100, 22883, 24661, 26443, 28219, 29999, 31782, 33562, 35342, 37121, 38900, 40680, 42461, 44241, 46020, 47801, 49579, 51359, 53139, 54919, 56701, 58479, 60261, 62038, 63819, 65598, 67379, 69160, 70939, 72717, 74497, 76277, 78059, 79838, 81619, 83396, 85178, 86957, 88738, 90517, 92297, 94076, 95857, 97636, 99416, 101195, 102978, 104758]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.hit0 *= 1.60
        self.hit1 *= 1 + 0.1 * 2


class 技能20(主动技能):
    名称 = "元素幻灭"
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 50
    MP = [935, 1960]
    无色消耗 = 2
    data0 = [0, 2072, 2282, 2493, 2706, 2913, 3121, 3334, 3545, 3755, 3965, 4178, 4386, 4597, 4806, 5018, 5227, 5438, 5651, 5859, 6069, 6279, 6491, 6702, 6911, 7122, 7334, 7543, 7750, 7963, 8174, 8385, 8595, 8806, 9016, 9227, 9438, 9646, 9857, 10067, 10280, 10488, 10699, 10910, 11121, 11330, 11539, 11750, 11962, 12172, 12383]
    hit0 = 1
    data1 = [0, 39408, 43404, 47403, 51402, 55401, 59398, 63395, 67392, 71392, 75390, 79387, 83383, 87383, 91381, 95380, 99379, 103374, 107374, 111372, 115370, 119368, 123365, 127364, 131361, 135361, 139357, 143355, 147353, 151352, 155351, 159347, 163347, 167343, 171343, 175342, 179338, 183338, 187334, 191333, 195330, 199330, 203326, 207325, 211321, 215320, 219319, 223318, 227315, 231312, 235309]
    hit1 = 1
    TP成长 = 0.1
    TP上限 = 5

    是否有护石 = 1

    def 装备护石(self, char):
        self.power0 = 5.4
        self.power1 = 1.1


class 技能21(主动技能):
    名称 = "元素禁域"
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 40
    MP = [800, 6000]
    无色消耗 = 3
    data0 = [0, 63901, 70384, 76864, 83350, 89834, 96314, 102798, 109282, 115763, 122247, 128730, 135213, 141696, 148179, 154661, 161145, 167629, 174111, 180594, 187076, 193560, 200043, 206523, 213010, 219494, 225974, 232457, 238940, 245421, 251905, 258390, 264871, 271355, 277838, 284321, 290804, 297286, 303769, 310254, 316736, 323218, 329702, 336185, 342669, 349152, 355632, 362115, 368597, 375081, 381564]
    hit0 = 1

    是否有护石 = 1
    护石CD缩减 = 0

    def 装备护石(self, char):
        self.倍率 *= 1.24
        self.护石CD缩减 = 4

    def 等效CD(self, **argv):
        额外恢复 = argv.get('额外恢复', 1.0)

        return super().等效CD(**argv) - self.护石CD缩减/(self.恢复+额外恢复)

class 技能22(被动技能):
    名称 = '黑瞳'
    所在等级 = 75
    等级上限 = 50
    等级精通 = 40
    学习间隔 = 3

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.23 + 0.02 * self.等级, 5)


class 技能23(主动技能):
    名称 = "聚能魔炮"
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 45
    MP = [580, 4500]
    无色消耗 = 5
    data0 = [0, 81141, 89373, 97606, 105838, 114068, 122302, 130534, 138765, 146997, 155229, 163461, 171692, 179924, 188156, 196388, 204621, 212853, 221085, 229317, 237548, 245779, 254013, 262245, 270476, 278709, 286941, 295173, 303404, 311635, 319867, 328099, 336332, 344563, 352794, 361030, 369261, 377493, 385724, 393956, 402188, 410420, 418651, 426883, 435115, 443348, 451579, 459811, 468043, 476273, 484505]
    hit0 = 1

    演出时间 = 1.5
    是否有护石 = 1
    # 攻击倍率 = 1.083

    def 装备护石(self, char):
        self.倍率 *= 1.33


class 技能24(主动技能):
    名称 = "末日湮灭"
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 180
    MP = [2500, 5000]
    无色消耗 = 10
    data0 = [0, 9850, 12135, 14421, 16706, 18991, 21277, 23561, 25845, 28131, 30415, 32700, 34984, 37271, 39555, 41840, 44124, 46411, 48695, 50979, 53265, 55548, 57835, 60120, 62404, 64690, 66974, 69259, 71546, 73828, 76114, 78400, 80683, 82970, 85254, 87539, 89825, 92110, 94393, 96678, 98964, 101250, 103533, 105819, 108104, 110388, 112673, 114958, 117243, 119527, 121814]
    hit0 = 1
    data1 = [0, 819, 1009, 1201, 1391, 1580, 1771, 1960, 2151, 2341, 2533, 2722, 2913, 3103, 3294, 3486, 3676, 3865, 4056, 4246, 4435, 4626, 4818, 5009, 5198, 5388, 5578, 5770, 5960, 6150, 6342, 6532, 6722, 6912, 7102, 7292, 7483, 7672, 7863, 8054, 8243, 8436, 8626, 8816, 9006, 9196, 9388, 9578, 9767, 9959, 10148]
    hit1 = 11
    data2 = [0, 177364, 218494, 259623, 300751, 341880, 383007, 424136, 465264, 506395, 547524, 588653, 629779, 670908, 712038, 753165, 794295, 835423, 876550, 917680, 958809, 999939, 1041067, 1082196, 1123324, 1164453, 1205581, 1246710, 1287838, 1328967, 1370095, 1411223, 1452352, 1493482, 1534612, 1575740, 1616869, 1657996, 1699124, 1740254, 1781382, 1822511, 1863640, 1904768, 1945896, 1987027, 2028155, 2069282, 2110413, 2151540, 2192668]
    hit2 = 1


class 技能25(被动技能):
    名称 = '异瞳'
    所在等级 = 95

    等级上限 = 50
    等级精通 = 40
    学习间隔 = 3

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能26(主动技能):
    名称 = "聚魔轰击"
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40
    CD = 60
    MP = [800, 6667]
    无色消耗 = 7
    data0 = [0, 7967, 8776, 9584, 10393, 11201, 12011, 12817, 13626, 14435, 15242, 16051, 16861, 17668, 18475, 19285, 20093, 20901, 21711, 22520, 23327, 24137, 24944, 25753, 26562, 27370, 28177, 28987, 29795, 30602, 31412, 32220, 33027, 33837, 34646, 35455, 36263, 37071, 37881, 38688, 39496, 40305, 41114, 41922, 42731, 43539, 44348, 45155, 45964, 46773, 47582]
    hit0 = 20


class 技能27(主动技能):
    名称 = "启源·微观宇宙"
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40
    CD = 290
    MP = [4028, 8056]
    无色消耗 = 15
    data0 = [0, 56592, 69713, 82836, 95959, 109082, 122205, 135328, 148451, 161573, 174696, 187818, 200941, 214064, 227187, 240310, 253432, 266555, 279679, 292800, 305923, 319047, 332169, 345291, 358415, 371537, 384660, 397784, 410905, 424030, 437153, 450275, 463398, 476521, 489644, 502767, 515890, 529012, 542134, 555257, 568380, 581504, 594626, 607749, 620873, 633995, 647116, 660240, 673362, 686485, 699609]
    hit0 = 1
    data1 = [0, 9430, 11617, 13804, 15991, 18178, 20366, 22554, 24740, 26928, 29114, 31302, 33488, 35676, 37864, 40051, 42238, 44424, 46612, 48798, 50986, 53172, 55360, 57546, 59735, 61922, 64109, 66295, 68483, 70669, 72857, 75043, 77233, 79418, 81607, 83792, 85981, 88166, 90354, 92540, 94728, 96916, 99103, 101290, 103477, 105664, 107851, 110038, 112225, 114412, 116601]
    hit1 = 12
    data2 = [0, 396143, 488003, 579862, 671723, 763582, 855441, 947300, 1039161, 1131021, 1222881, 1314740, 1406600, 1498460, 1590320, 1682180, 1774039, 1865900, 1957758, 2049618, 2141478, 2233338, 2325198, 2417057, 2508917, 2600778, 2692636, 2784496, 2876355, 2968215, 3060077, 3151936, 3243794, 3335653, 3427514, 3519374, 3611234, 3703094, 3794955, 3886813, 3978673, 4070532, 4162392, 4254253, 4346112, 4437972, 4529830, 4621690, 4713551, 4805410, 4897270]
    hit2 = 1


class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'elemental_bomber'
        self.名称 = '知源·元素爆破师'
        self.角色 = '魔法师(男)'

        self.职业 = '元素爆破师'
        self.武器选项 = ['魔杖', '法杖']
        self.输出类型选项 = ['魔法百分比']
        self.防具精通属性 = ['智力']
        self.类型 = '魔法百分比'
        self.武器类型 = '魔杖'
        self.防具类型 = '布甲'

        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1

        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 2.07

        super().__init__(equVersion)

    def set_skill_info(self, info, rune_except=[], clothes_pants=[]):
        super().set_skill_info(info, clothes_pants=['元素炮'])

    def set_individuation(self, info):
        info['char_optiopns'] = [
            {
                "name": "属性变换属性(影响抗性)",
                "option": ["火", "光", "冰", "暗"]
            }
        ]

    # 抗性有成长的较为特殊 需要按照以下进行添加
    def 职业特殊设置(self):
        抗性 = [10, 10, 10, 10]
        抗性[self.get_individuation(0)] = 0
        self.火属性抗性加成(抗性[0])
        self.光属性抗性加成(抗性[1])
        self.冰属性抗性加成(抗性[2])
        self.暗属性抗性加成(抗性[3])
